@import '../../style/themes/index.less';

@toast-prefix-cls: ~'@{prefix}-toast';

.@{toast-prefix-cls} {
  min-width: 140px;

  &[data-type] {
    padding: 25px 25px;
  }

  &[data-type='text'] {
    padding: 15px 25px;
  }

  &-popup {
    position: fixed;
    z-index: 4020;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
  }

  &-wrapper {
    position: relative;
    z-index: 4020;
    // padding: 0 25px 15px;
    top: -40px;
    background: hsla(0, 0%, 7%, 0.7);
    text-align: center;
    border-radius: 9px;
    color: #fff;

    animation: fadeOut ease 0.3s forwards;
    animation-fill-mode: forwards;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: auto;
    // max-width: 12em;
    box-sizing: border-box;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    max-width: 50%;
  }

  &-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;

    .weui-icon {
      width: 120px;
      height: 120px;
      box-sizing: border-box;
    }
    .weui-loading {
      width: 80px;
      height: 80px;
      box-sizing: border-box;
    }
  }

  &-msg {
    font-size: 26px;
    color: #fff;
  }

  .weui-loading {
    display: inline-block;
    vertical-align: middle;
    border-left-color: rgba(255, 255, 255, 0.25);
    border-right-color: rgba(255, 255, 255, 0.25);
    border-bottom-color: rgba(255, 255, 255, 0.25);
  }
}

.weui-icon-success {
  -webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E);
  mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E);
  color: #07c160;
}
.weui-icon-warn {
  -webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.763-15.864l.11%207.596h1.305l.11-7.596h-1.525zm.759%2010.967c.512%200%20.902-.383.902-.882%200-.5-.39-.882-.902-.882a.878.878%200%2000-.896.882c0%20.499.396.882.896.882z%22%2F%3E%3C%2Fsvg%3E);
  mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.763-15.864l.11%207.596h1.305l.11-7.596h-1.525zm.759%2010.967c.512%200%20.902-.383.902-.882%200-.5-.39-.882-.902-.882a.878.878%200%2000-.896.882c0%20.499.396.882.896.882z%22%2F%3E%3C%2Fsvg%3E);
  color: @error-color;
}

[class^='weui-icon-'],
[class*=' weui-icon-'] {
  display: inline-block;
  vertical-align: middle;
  width: 48px;
  height: 48px;
  -webkit-mask-position: 50% 50%;
  mask-position: 50% 50%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100%;
  mask-size: 100%;
  background-color: currentColor;
}
